Page({
  data: {
    noticeList: []
  },
  onLoad () {
    this.getNotices()
  },
  async getNotices () {
    const data = await wx.http.get('/announcement')
    if (data.code !== 10000) return wx.utils.toast()
    this.setData({ noticeList: data.data })
  }
})
